//
//  UITextField+Extension.h
//  Practice
//
//  Created by yons on 14.8.20.
//  Copyright © 2020 yons. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UITextField (Extension)

/// placeholder
/// @param placeholder placeholder
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder;

/// placeholder+文本颜色+文本大小+字重+是否显示清除按钮
/// @param placeholder placeholder
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param showClearModel 是否显示清除按钮
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight isShowClearModel:(BOOL)showClearModel;

/// placeholder+文本颜色+文本大小+字重+是否显示清除按钮+按钮点击事件
/// @param placeholder placeholder
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param showClearModel 是否显示清除按钮
/// @param target target
/// @param action 方法
/// @param controlEvents 点击事件
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight isShowClearModel:(BOOL)showClearModel addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

/// placeholder+文本颜色+文本大小+字重+剪切半径+是否显示清除按钮
/// @param placeholder placeholder
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
/// @param showClearModel 是否显示清除按钮
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius isShowClearModel:(BOOL)showClearModel;

/// placeholder+文本颜色+文本大小+字重+剪切半径+是否显示清除按钮+按钮点击事件
/// @param placeholder placeholder
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
/// @param showClearModel 是否显示清除按钮
/// @param target target
/// @param action 方法
/// @param controlEvents 点击事件
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius isShowClearModel:(BOOL)showClearModel addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;

/// placeholder+文本颜色+文本大小+字重+剪切半径+边框宽度+边框颜色+是否显示清除按钮
/// @param placeholder placeholder
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
/// @param borderWidth 边框宽度
/// @param borderColor 边框颜色
/// @param showClearModel 是否显示清除按钮
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor isShowClearModel:(BOOL)showClearModel;

/// placeholder+文本颜色+文本大小+字重+剪切半径+边框宽度+边框颜色+是否显示清除按钮+按钮点击事件
/// @param placeholder placeholder
/// @param textColor 文本颜色
/// @param size 文本大小
/// @param weight 字重
/// @param radius 剪切半径
/// @param borderWidth 边框宽度
/// @param borderColor 边框颜色
/// @param showClearModel 是否显示清除按钮
/// @param target target
/// @param action 方法
/// @param controlEvents 点击事件
+ (UITextField *)textFieldWithPlaceholder:(NSString *)placeholder textColor:(UIColor *)textColor fontSize:(CGFloat)size weight:(UIFontWeight)weight radius:(CGFloat)radius borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor isShowClearModel:(BOOL)showClearModel addTarget:(nullable id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents;


/// 左边leftView
/// @param frame 大小
- (UITextField *)textFieldWithLeftImageViewFrame:(CGRect)frame;

/// 左边leftView
/// @param frame 大小
/// @param named 图片名
- (UITextField *)textFieldWithLeftImageViewFrame:(CGRect)frame imageNamed:(NSString *)named;

/// 右边leftView
/// @param frame 大小
/// @param named 图片名
- (UITextField *)textFieldWithRightImageViewFrame:(CGRect)frame imageNamed:(NSString *)named;


/// 右边leftView
/// @param frame 大小
/// @param customeView 自定义View
- (UITextField *)textFieldWithRightCustomeViewFrame:(CGRect)frame customeView:(UIView *)customeView;

@end

NS_ASSUME_NONNULL_END
